package org.wak.character.display
{
	
	/**
	 * Factory of Character Displays
	 * 
	 */	
	public class CharacterDisplayFactory
	{
		public function CharacterDisplayFactory()
		{
		}
		
		/**
		 * Factory method of AbstractCharacterDisplay . 
		 * @param pCharDispDef ICharacterDisplayDefinition 
		 * @return a brand new AbstractCharacterDisplay 
		 * 
		 */		
		public static function CreateCharacterDisplay( pCharDispDef:ICharacterDisplayDefinition ):AbstractCharacterDisplay
		{
			var fRetDisp:AbstractCharacterDisplay = null ;
			
			if(pCharDispDef.IsDummyDisplay())
			{
				fRetDisp = new TestPlayerDisplay( pCharDispDef );
			}
			
			
			if(pCharDispDef.IsBmpDisplay())
			{
				fRetDisp = new SingleBmpCharacterDisplay( pCharDispDef );
			}
			
			return fRetDisp ;
		}

	}
}